import request from '@/utils/request'

// 查询故障报修列表
export function listFault(query) {
  return request({
    url: '/iotDevice/fault/list',
    method: 'get',
    params: query
  })
}

// 查询故障报修详细
export function getFault(deviceFaultId) {
  return request({
    url: '/iotDevice/fault/' + deviceFaultId,
    method: 'get'
  })
}

// 新增故障报修
export function addFault(data) {
  return request({
    url: '/iotDevice/fault',
    method: 'post',
    data: data
  })
}

// 修改故障报修
export function updateFault(data) {
  return request({
    url: '/iotDevice/fault',
    method: 'put',
    data: data
  })
}

// 删除故障报修
export function delFault(deviceFaultId) {
  return request({
    url: '/iotDevice/fault/' + deviceFaultId,
    method: 'delete'
  })
}

// 导出故障报修
export function exportFault(query) {
  return request({
    url: '/iotDevice/fault/export',
    method: 'get',
    params: query
  })
}